#!/usr/bin/env python

import SocketServer


class MyTCPHandler(SocketServer.BaseRequestHandler):
    def handle(self):
        while True:
            data = self.request.recv(1024)
            if not data:
                break
            self.request.sendall(data.upper())


if __name__ == "__main__":
    HOST, PORT = "192.168.56.108", 5000
    server = SocketServer.ThreadingTCPServer((HOST, PORT), MyTCPHandler)
    server.serve_forever()
